<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator="layout">
<head>
  <title>账户管理</title>
  <script src="http://webapi.amap.com/maps?v=1.3&amp;plugin=AMap.PolyEditor,AMap.CircleEditor"></script>
</head>
<body>
<div layout:fragment="content">
		<div class="detail">
			<div class="form-background" id="accountHtml">
				<div class="receivable-setting-item">
					<p style="font-size:18px;padding:20px;">机构详情</p>
					<form id="brandForm" style="margin-top: 20px;">
						<!-- <div class="form-group">
							<label class="form-label-new">美团：</label>
							<div class="form-tip-wrapper">
								<input type="text" name="mt" th:value="${data.MT}"  class="input-newlarge changecolor" placeholder=""/>
								<div id="mtTip" class="form-tip-error"></div>
							</div>
						</div>
						<div class="form-group">
							<label class="form-label-new">大众：</label>
							<div class="form-tip-wrapper">
							<input type="text" name="dz" th:value="${data.DZ}" class="input-newlarge changecolor" placeholder=""/>
							<div id="dzTip" class="form-tip-error"></div>
							</div>
						</div>
						<div class="form-group">
							<label class="form-label-new">官网：</label>
							<div class="form-tip-wrapper">
							<input type="text" name="gw" th:value="${data.GW}" class="input-newlarge changecolor" placeholder=""/>
							<div id="gwTip" class="form-tip-error"></div>
							</div>
						</div> -->
						<div class="form-group">
							<label class="form-label-new">坐标：</label>
							<div class="form-tip-wrapper">
							<input type="text" name="lngLat"  class="input-newlarge changecolor" placeholder=""/>
							<span class="desc-info-btn">选择</span>
							</div>
						</div>
						<div class="form-group">
							<label class="form-label-new">品牌：</label>
							<div class="form-tip-wrapper">
								<label class="check-label"><input type="radio" th:checked="${data.isBrandOrg==true}" name="isBrandOrg" value="true"/> 开启</label>
								<label class="check-label"><input type="radio" th:checked="${data.isBrandOrg==false}" name="isBrandOrg" value="false"/> 关闭</label>
							</div>
						</div>
						<div class="form-group">
							<label class="form-label-w-112"></label>
							<input type="submit" value="保存" class="input-submit-03"/>
						</div>
					</form>
				</div>
			</div>
		</div>
		<script type="text/javascript" th:inline="javascript">
			;$(function() {
				setMenu("机构详情", true);
				$.formValidator.initConfig({formID:"brandForm",debug:false,onError:function(msg){}});
				$("#brandForm input[name='mt']").formValidator({tipID:"mtTip",onShow:"",onFocus:"",onCorrect:""}).regexValidator({regExp:"url",dataType:"enum",onError:"格式不正确例如：http://www.baidu.com"});
				$("#brandForm input[name='gw']").formValidator({tipID:"gwTip",onShow:"",onFocus:"",onCorrect:""}).regexValidator({regExp:"url",dataType:"enum",onError:"格式不正确例如：http://www.baidu.com"});
				$("#brandForm input[name='dz']").formValidator({tipID:"dzTip",onShow:"",onFocus:"",onCorrect:""}).regexValidator({regExp:"url",dataType:"enum",onError:"格式不正确例如：http://www.baidu.com"});
				$('.changecolor').focus(function() {
		      	    $(this).css('border-color', '#FF6121');
		      	  }).blur(function() {
		      	    $(this).css('border-color', '');
		      	  });
				$("#brandForm").formsubmit({url:"saveOrgShop",type:"post",success:function(){
					$.jjalert({text:"机构详细设置成功", yes:function(){
						location.href="../acc/orgdetails";
					}});
				}});
				
				$('.desc-info-btn').on('click',function(e){
					var lngLat = $("#brandForm input[name='lngLat']").val();
			  		var lls = lngLat.split(",");
			  		var options = {select:function(lng, lat){
			  			$("#brandForm input[name='lngLat']").val(lng+","+lat);
			  		}};
			  		if(lls.length == 2){
			  			options.lng = lls[0];
			  			options.lat = lls[1];
			  		}
			  		$.selectMap(options);
				});

			});
		</script>
</div>
</body>
</html>